package com.jsmy.marketing.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jsmy.marketing.R;
import com.jsmy.marketing.bean.ListenerBean;

/**
 * Created with Android Studio.
 * User: wei_cd.
 * Date: 2018/4/23.
 * Time: 17:52.
 * To change for file | settings | file and code templates.
 */

public class ListenerAdapter extends BaseQuickAdapter<ListenerBean.DataBean.ListBean, BaseViewHolder> {

    public ListenerAdapter() {
        super(R.layout.fragment_customer_listener_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, ListenerBean.DataBean.ListBean item) {
        helper.setText(R.id.tv_time, item.getStsj())
                .setText(R.id.tv_content, "试听内容：" + item.getStnr())
                .setText(R.id.tv_finish,
                        TextUtils.isEmpty(item.getCqzt())?"":item.getCqzt())
                .addOnClickListener(R.id.tv_finish)

        ;
    }

}
